<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <p v-if="ok">失败了</p>
        <p v-else>成功了</p>
        <p v-show="ok">这是失败了</p>
        <p v-show="!ok">这是成功了</p>
        <button @click="ok = !ok">点击切换</button>
    </div>
</body>
<script src="../../public/vue.dev.js"></script>
<script>
    const vm = new Vue({
        el: '#app',
        data: {
            ok: true,
        },
        methods:{
            change(){
                this.ok = !this.ok;
            }
        }
    });

    /**
     * tips: v-if v-else 只会出现一个标签
     * v-show 其实是显示/隐藏
     * 核心思想还是 M V VM
     * */
</script>
</html>